local newt = require("newt")
return function(t, out)
    local list = out or newt()
    for k, v in pairs(t) do
        list[v] = k
    end
    return list
end
